package com.gree.elasticsearch.controller;

import com.gree.elasticsearch.dto.Result;
import com.gree.elasticsearch.util.ResponseUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;


/**
 * 总有刁民想，请叫我小花狗
 * create by zxw on 2020/5/30
 */
@RequestMapping("/token")
@RestController
public class TokenVerfiyErrorController {

    private Logger log = LoggerFactory.getLogger(TokenVerfiyErrorController.class.getName());

    @GetMapping("/token/error")
    public Result tokenError(HttpServletRequest httpServletRequest) {
        log.debug("token verify failure");
        return ResponseUtil.unAuthentication();
    }
}
